package com.cwh.taskcenter.domain.task.model;

import lombok.Getter;

/**
 * @author cwh
 */
@Getter
public enum TaskType {
    DAILY("日常任务"),
    TIME_LIMITED("限时任务");
    
    private final String description;
    
    TaskType(String description) {
        this.description = description;
    }

    public static TaskType fromString(String name) {
        for (TaskType taskType : values()) {
            if (taskType.name().equals(name)) {
                return taskType;
            }
        }
        throw new IllegalArgumentException("Invalid task type: " + name);
    }

}
